package cn.com.sise.pojo;

import java.sql.Timestamp;
import java.text.SimpleDateFormat;

public class Admin {
    private Integer adminId;
    private String name;
    private String password;
    private int authorityLevel;
    private String registerTime;

    public Integer getAdminId() {
        return adminId;
    }

    public void setAdminId(Integer adminId) {
        this.adminId = adminId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getAuthorityLevel() {
        return authorityLevel;
    }

    public void setAuthorityLevel(int authorityLevel) {
        this.authorityLevel = authorityLevel;
    }

    public String getRegisterTime() {
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(registerTime);
    }

    public void setRegisterTime(Timestamp registerTime) {
        this.registerTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(registerTime);
        ;
    }

    @Override
    public String toString() {
        return "Admin{" +
                "adminId=" + adminId +
                ", name='" + name + '\'' +
                ", password='" + password + '\'' +
                ", authorityLevel=" + authorityLevel +
                ", registerTime=" + registerTime +
                '}';
    }
}
